package com.qishon.pc.domain.Application;

import com.qishon.pc.domain.service.DownloadZipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.zip.ZipOutputStream;

/**
 * Created by yongwei.chen on 2017/1/9.
 */
@Component
public class DownloadZipManager {
    @Autowired
    private DownloadZipService downloadZipService;

    public HttpServletResponse downloadZip(String fileName, HttpServletResponse response) {
        return downloadZipService.downloadZip(fileName,response);
    }

    public void zip(String out, File f, String base) throws Exception {
        downloadZipService.zip(out,f,base);
    }
}
